﻿using System.ComponentModel.DataAnnotations;

namespace ETask.Api.Models
{
    /// <summary>
    /// 基础实体类，包含公共属性
    /// </summary>
    public abstract class BaseEntity
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdatedAt { get; set; } = DateTime.Now;

        public int CreateBy { get;set; }

        public int UpdateBy { get;set; }
    }
}
